<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/report/report/View_ReportDayInStock.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/report/report/View_ReportDayInStock2.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '每日来料报表',
                name: 'report/View_ReportDayInStock',
                url: "/View_ReportDayInStock/",
                sortName: "FDate"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"OrgCode":"","FNumber":"","FDate":""});
            const searchFormOptions = ref([[{"dataKey":"Org","data":[],"title":"组织","field":"OrgCode","type":"select"},{"title":"来料日期","field":"FDate","type":"date"}],[{"title":"物料编码","field":"FNumber","type":"like"}]]);
            const columns = ref([{field:'OrgCode',title:'组织',type:'string',bind:{ key:'Org',data:[]},width:110,hidden:true,align:'left'},
                       {field:'FDate',title:'来料日期',type:'datetime',width:120,require:true,align:'left',sort:true},
                       {field:'FSupName',title:'供应商',type:'string',width:180,align:'left'},
                       {field:'FNumber',title:'物料编码',type:'string',width:150,require:true,align:'left'},
                       {field:'FName',title:'物料名称',type:'string',width:120,require:true,align:'left'},
                       {field:'PQty',title:'计划到料数量',type:'decimal',width:100,align:'left'},
                       {field:'OldPQty',title:'上版计划到料数量',type:'decimal',width:100,align:'left'},
                       {field:'PWQty',title:'周计划到料数量',type:'decimal',width:100,align:'left'},
                       {field:'FSIQty',title:'来料数量',type:'decimal',width:100,align:'left'},
                       {field:'FQty',title:'入库数量',type:'decimal',width:100,align:'left'},
                       {field:'FDiffQty',title:'差异数量',type:'decimal',width:100,align:'left'},
                       {field:'FAccDiffQty',title:'累计差异数量',type:'decimal',width:100,align:'left'},
                       {field:'FIsZY',title:'是否专用',type:'string',width:80,require:true,align:'left'},
                       {field:'FSharePrd',title:'对应成品型号',type:'string',width:200,align:'left'},
                       {field:'NowInvQty',title:'即时库存',type:'decimal',width:100,require:true,align:'left'},
                       {field:'POQty',title:'采购在途',type:'decimal',width:100,align:'left'},
                       {field:'LTInfo',title:'物料LT',type:'int',width:100,require:true,align:'left'},
                       {field:'MOQInfo',title:'MOQ',type:'decimal',width:100,align:'left'},
                       {field:'ID',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
